home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / gcc.info-1 < prev    next >
Encoding:
GNU Info File  |  2001-07-15  |  41.3 KB  |  969 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3.  
  4. INFO-DIR-SECTION Programming
  5. START-INFO-DIR-ENTRY
  6. * gcc: (gcc).                  The GNU Compiler Collection.
  7. END-INFO-DIR-ENTRY
  8.    This file documents the use and the internals of the GNU compiler.
  9.  
  10.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  11. Boston, MA 02111-1307 USA
  12.  
  13.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  14. 1999, 2000 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License" and "Funding
  23. for Free Software" are included exactly as in the original, and
  24. provided that the entire resulting derived work is distributed under
  25. the terms of a permission notice identical to this one.
  26.  
  27.    Permission is granted to copy and distribute translations of this
  28. manual into another language, under the above conditions for modified
  29. versions, except that the sections entitled "GNU General Public
  30. License" and "Funding for Free Software", and this permission notice,
  31. may be included in translations approved by the Free Software Foundation
  32. instead of in the original English.
  33.  
  34. 
  35. File: gcc.info,  Node: Top,  Next: G++ and GCC,  Up: (DIR)
  36.  
  37. Introduction
  38. ************
  39.  
  40.    This manual documents how to run, install and port the GNU compiler,
  41. as well as its new features and incompatibilities, and how to report
  42. bugs.  It corresponds to GCC version 2.95.
  43.  
  44. * Menu:
  45.  
  46.  
  47. * G++ and GCC::     You can compile C or C++ programs.
  48. * Invoking GCC::    Command options supported by `gcc'.
  49. * Installation::    How to configure, compile and install GCC.
  50. * C Extensions::    GNU extensions to the C language family.
  51. * C++ Extensions::  GNU extensions to the C++ language.
  52. * Gcov::        gcov: a GCC test coverage program.
  53. * Trouble::         If you have trouble installing GCC.
  54. * Bugs::            How, why and where to report bugs.
  55. * Service::         How to find suppliers of support for GCC.
  56. * Contributing::    How to contribute to testing and developing GCC.
  57. * VMS::             Using GCC on VMS.
  58.  
  59. * Portability::     Goals of GCC's portability features.
  60. * Interface::       Function-call interface of GCC output.
  61. * Passes::          Order of passes, what they do, and what each file is for.
  62. * RTL::             The intermediate representation that most passes work on.
  63. * Machine Desc::    How to write machine description instruction patterns.
  64. * Target Macros::   How to write the machine description C macros.
  65. * Config::          Writing the `xm-MACHINE.h' file.
  66. * Fragments::       Writing the `t-TARGET' and `x-HOST' files.
  67.  
  68. * Funding::         How to help assure funding for free software.
  69. * GNU/Linux::       Linux and the GNU Project
  70.  
  71. * Copying::         GNU General Public License says
  72.                      how you can copy and share GCC.
  73. * Contributors::    People who have contributed to GCC.
  74.  
  75. * Index::        Index of concepts and symbol names.
  76.  
  77. 
  78. File: gcc.info,  Node: G++ and GCC,  Next: Invoking GCC,  Prev: Top,  Up: Top
  79.  
  80. Compile C, C++, Objective C, or Fortran
  81. ***************************************
  82.  
  83.    The C, C++, and Objective C, and Fortran versions of the compiler are
  84. integrated; this is why we use the name "GNU Compiler Collection".  GCC
  85. can compile programs written in C, C++, Objective C, or Fortran.  The
  86. Fortran compiler is described in a separate manual.
  87.  
  88.    "GCC" is a common shorthand term for the GNU Compiler Collection.
  89. This is both the most general name for the compiler, and the name used
  90. when the emphasis is on compiling C programs (as the abbreviation
  91. formerly stood for "GNU C Compiler").
  92.  
  93.    When referring to C++ compilation, it is usual to call the compiler
  94. "G++".  Since there is only one compiler, it is also accurate to call
  95. it "GCC" no matter what the language context; however, the term "G++"
  96. is more useful when the emphasis is on compiling C++ programs.
  97.  
  98.    We use the name "GCC" to refer to the compilation system as a whole,
  99. and more specifically to the language-independent part of the compiler.
  100. For example, we refer to the optimization options as affecting the
  101. behavior of "GCC" or sometimes just "the compiler".
  102.  
  103.    Front ends for other languages, such as Ada 9X, Fortran, Modula-3,
  104. and Pascal, are under development.  These front-ends, like that for
  105. C++, are built in subdirectories of GCC and link to it.  The result is
  106. an integrated compiler that can compile programs written in C, C++,
  107. Objective C, or any of the languages for which you have installed front
  108. ends.
  109.  
  110.    In this manual, we only discuss the options for the C, Objective-C,
  111. and C++ compilers and those of the GCC core.  Consult the documentation
  112. of the other front ends for the options to use when compiling programs
  113. written in other languages.
  114.  
  115.    G++ is a *compiler*, not merely a preprocessor.  G++ builds object
  116. code directly from your C++ program source.  There is no intermediate C
  117. version of the program.  (By contrast, for example, some other
  118. implementations use a program that generates a C program from your C++
  119. source.)  Avoiding an intermediate C representation of the program means
  120. that you get better object code, and better debugging information.  The
  121. GNU debugger, GDB, works with this information in the object code to
  122. give you comprehensive C++ source-level editing capabilities (*note C
  123. and C++: (gdb.info)C.).
  124.  
  125. 
  126. File: gcc.info,  Node: Invoking GCC,  Next: Installation,  Prev: G++ and GCC,  Up: Top
  127.  
  128. GCC Command Options
  129. *******************
  130.  
  131.    When you invoke GCC, it normally does preprocessing, compilation,
  132. assembly and linking.  The "overall options" allow you to stop this
  133. process at an intermediate stage.  For example, the `-c' option says
  134. not to run the linker.  Then the output consists of object files output
  135. by the assembler.
  136.  
  137.    Other options are passed on to one stage of processing.  Some options
  138. control the preprocessor and others the compiler itself.  Yet other
  139. options control the assembler and linker; most of these are not
  140. documented here, since you rarely need to use any of them.
  141.  
  142.    Most of the command line options that you can use with GCC are useful
  143. for C programs; when an option is only useful with another language
  144. (usually C++), the explanation says so explicitly.  If the description
  145. for a particular option does not mention a source language, you can use
  146. that option with all supported languages.
  147.  
  148.    *Note Compiling C++ Programs: Invoking G++, for a summary of special
  149. options for compiling C++ programs.
  150.  
  151.    The `gcc' program accepts options and file names as operands.  Many
  152. options have multiletter names; therefore multiple single-letter options
  153. may *not* be grouped: `-dr' is very different from `-d -r'.
  154.  
  155.    You can mix options and other arguments.  For the most part, the
  156. order you use doesn't matter.  Order does matter when you use several
  157. options of the same kind; for example, if you specify `-L' more than
  158. once, the directories are searched in the order specified.
  159.  
  160.    Many options have long names starting with `-f' or with `-W'--for
  161. example, `-fforce-mem', `-fstrength-reduce', `-Wformat' and so on.
  162. Most of these have both positive and negative forms; the negative form
  163. of `-ffoo' would be `-fno-foo'.  This manual documents only one of
  164. these two forms, whichever one is not the default.
  165.  
  166. * Menu:
  167.  
  168. * Option Summary::    Brief list of all options, without explanations.
  169. * Overall Options::     Controlling the kind of output:
  170.                         an executable, object files, assembler files,
  171.                         or preprocessed source.
  172. * Invoking G++::    Compiling C++ programs.
  173. * C Dialect Options::   Controlling the variant of C language compiled.
  174. * C++ Dialect Options:: Variations on C++.
  175. * Warning Options::     How picky should the compiler be?
  176. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  177. * Optimize Options::    How much optimization?
  178. * Preprocessor Options:: Controlling header files and macro definitions.
  179.                          Also, getting dependency information for Make.
  180. * Assembler Options::   Passing options to the assembler.
  181. * Link Options::        Specifying libraries and so on.
  182. * Directory Options::   Where to find header files and libraries.
  183.                         Where to find the compiler executable files.
  184. * Target Options::      Running a cross-compiler, or an old version of GCC.
  185. * Submodel Options::    Specifying minor hardware or convention variations,
  186.                         such as 68010 vs 68020.
  187. * Code Gen Options::    Specifying conventions for function calls, data layout
  188.                         and register usage.
  189. * Environment Variables:: Env vars that affect GCC.
  190. * Running Protoize::    Automatically adding or removing function prototypes.
  191.  
  192. 
  193. File: gcc.info,  Node: Option Summary,  Next: Overall Options,  Up: Invoking GCC
  194.  
  195. Option Summary
  196. ==============
  197.  
  198.    Here is a summary of all the options, grouped by type.  Explanations
  199. are in the following sections.
  200.  
  201. *Overall Options*
  202.      *Note Options Controlling the Kind of Output: Overall Options.
  203.           -c  -S  -E  -o FILE  -pipe  -v  --help  -x LANGUAGE
  204.  
  205. *C Language Options*
  206.      *Note Options Controlling C Dialect: C Dialect Options.
  207.           -ansi -fstd  -fallow-single-precision  -fcond-mismatch  -fno-asm
  208.           -fno-builtin  -ffreestanding  -fhosted  -fsigned-bitfields  -fsigned-char
  209.           -funsigned-bitfields  -funsigned-char  -fwritable-strings
  210.           -traditional  -traditional-cpp  -trigraphs
  211.  
  212. *C++ Language Options*
  213.      *Note Options Controlling C++ Dialect: C++ Dialect Options.
  214.           -fno-access-control  -fcheck-new  -fconserve-space  -fdollars-in-identifiers
  215.           -fno-elide-constructors  -fexternal-templates  -ffor-scope
  216.           -fno-for-scope  -fno-gnu-keywords  -fguiding-decls  -fhandle-signatures
  217.           -fhonor-std -fhuge-objects  -fno-implicit-templates  -finit-priority
  218.           -fno-implement-inlines -fname-mangling-version-N  -fno-default-inline
  219.           -foperator-names  -fno-optional-diags  -fpermissive -frepo  -fstrict-prototype
  220.           -fsquangle  -ftemplate-depth-N  -fthis-is-variable  -fvtable-thunks
  221.           -nostdinc++  -Wctor-dtor-privacy -Wno-deprecated -Weffc++
  222.           -Wno-non-template-friend
  223.           -Wnon-virtual-dtor  -Wold-style-cast  -Woverloaded-virtual
  224.           -Wno-pmf-conversions  -Wreorder  -Wsign-promo  -Wsynth
  225.  
  226. *Warning Options*
  227.      *Note Options to Request or Suppress Warnings: Warning Options.
  228.           -fsyntax-only  -pedantic  -pedantic-errors
  229.           -w  -W  -Wall  -Waggregate-return  -Wbad-function-cast
  230.           -Wcast-align  -Wcast-qual  -Wchar-subscripts  -Wcomment
  231.           -Wconversion  -Werror  -Wformat
  232.           -Wid-clash-LEN  -Wimplicit -Wimplicit-int
  233.           -Wimplicit-function-declaration  -Wimport
  234.           -Werror-implicit-function-declaration  -Winline
  235.           -Wlarger-than-LEN  -Wlong-long
  236.           -Wmain  -Wmissing-declarations  -Wmissing-noreturn
  237.           -Wmissing-prototypes  -Wmultichar  -Wnested-externs  -Wno-import
  238.           -Wparentheses -Wpointer-arith  -Wredundant-decls
  239.           -Wreturn-type -Wshadow  -Wsign-compare  -Wstrict-prototypes
  240.           -Wswitch  -Wtraditional
  241.           -Wtrigraphs -Wundef  -Wuninitialized  -Wunused  -Wwrite-strings
  242.           -Wunknown-pragmas
  243.  
  244. *Debugging Options*
  245.      *Note Options for Debugging Your Program or GCC: Debugging Options.
  246.           -a  -ax  -dLETTERS  -fdump-unnumbered -fpretend-float
  247.           -fprofile-arcs  -ftest-coverage
  248.           -g  -gLEVEL  -gcoff  -gdwarf  -gdwarf-1  -gdwarf-1+  -gdwarf-2
  249.           -ggdb  -gstabs  -gstabs+  -gxcoff  -gxcoff+
  250.           -p  -pg  -print-file-name=LIBRARY  -print-libgcc-file-name
  251.           -print-prog-name=PROGRAM  -print-search-dirs  -save-temps
  252.  
  253. *Optimization Options*
  254.      *Note Options that Control Optimization: Optimize Options.
  255.           -fbranch-probabilities  -foptimize-register-moves
  256.           -fcaller-saves  -fcse-follow-jumps  -fcse-skip-blocks
  257.           -fdelayed-branch   -fexpensive-optimizations
  258.           -ffast-math  -ffloat-store  -fforce-addr  -fforce-mem
  259.           -fdata-sections -ffunction-sections  -fgcse
  260.           -finline-functions -finline-limit-N -fkeep-inline-functions
  261.           -fno-default-inline -fno-defer-pop  -fno-function-cse
  262.           -fno-inline  -fno-peephole  -fomit-frame-pointer -fregmove
  263.           -frerun-cse-after-loop  -frerun-loop-opt -fschedule-insns
  264.           -fschedule-insns2  -fstrength-reduce  -fthread-jumps
  265.           -funroll-all-loops  -funroll-loops
  266.           -fmove-all-movables  -freduce-all-givs -fstrict-aliasing
  267.           -O  -O0  -O1  -O2  -O3 -Os
  268.  
  269. *Preprocessor Options*
  270.      *Note Options Controlling the Preprocessor: Preprocessor Options.
  271.           -AQUESTION(ANSWER)  -C  -dD  -dM  -dN
  272.           -DMACRO[=DEFN]  -E  -H
  273.           -idirafter DIR
  274.           -include FILE  -imacros FILE
  275.           -iprefix FILE  -iwithprefix DIR
  276.           -iwithprefixbefore DIR  -isystem DIR -isystem-c++ DIR
  277.           -M  -MD  -MM  -MMD  -MG  -nostdinc  -P  -trigraphs
  278.           -undef  -UMACRO  -Wp,OPTION
  279.  
  280. *Assembler Option*
  281.      *Note Passing Options to the Assembler: Assembler Options.
  282.           -Wa,OPTION
  283.  
  284. *Linker Options*
  285.      *Note Options for Linking: Link Options.
  286.           OBJECT-FILE-NAME  -lLIBRARY
  287.           -nostartfiles  -nodefaultlibs  -nostdlib
  288.           -s  -static  -shared  -symbolic
  289.           -Wl,OPTION  -Xlinker OPTION
  290.           -u SYMBOL
  291.  
  292. *Directory Options*
  293.      *Note Options for Directory Search: Directory Options.
  294.           -BPREFIX  -IDIR  -I-  -LDIR  -specs=FILE
  295.  
  296. *Target Options*
  297.      *Note Target Options::.
  298.           -b MACHINE  -V VERSION
  299.  
  300. *Machine Dependent Options*
  301.      *Note Hardware Models and Configurations: Submodel Options.
  302.           *M680x0 Options*
  303.           -m68000  -m68020  -m68020-40  -m68020-60  -m68030  -m68040
  304.           -m68060  -mcpu32 -m5200  -m68881  -mbitfield  -mc68000  -mc68020
  305.           -mfpa -mnobitfield  -mrtd  -mshort  -msoft-float
  306.           -malign-int
  307.           
  308.           *VAX Options*
  309.           -mg  -mgnu  -munix
  310.           
  311.           *SPARC Options*
  312.           -mcpu=CPU TYPE
  313.           -mtune=CPU TYPE
  314.           -mcmodel=CODE MODEL
  315.           -malign-jumps=NUM  -malign-loops=NUM
  316.           -malign-functions=NUM
  317.           -m32  -m64
  318.           -mapp-regs  -mbroken-saverestore  -mcypress  -mepilogue
  319.           -mflat  -mfpu  -mhard-float  -mhard-quad-float
  320.           -mimpure-text  -mlive-g0  -mno-app-regs  -mno-epilogue
  321.           -mno-flat  -mno-fpu  -mno-impure-text
  322.           -mno-stack-bias  -mno-unaligned-doubles
  323.           -msoft-float  -msoft-quad-float  -msparclite  -mstack-bias
  324.           -msupersparc  -munaligned-doubles  -mv8
  325.           
  326.           *Convex Options*
  327.           -mc1  -mc2  -mc32  -mc34  -mc38
  328.           -margcount  -mnoargcount
  329.           -mlong32  -mlong64
  330.           -mvolatile-cache  -mvolatile-nocache
  331.           
  332.           *AMD29K Options*
  333.           -m29000  -m29050  -mbw  -mnbw  -mdw  -mndw
  334.           -mlarge  -mnormal  -msmall
  335.           -mkernel-registers  -mno-reuse-arg-regs
  336.           -mno-stack-check  -mno-storem-bug
  337.           -mreuse-arg-regs  -msoft-float  -mstack-check
  338.           -mstorem-bug  -muser-registers
  339.           
  340.           *ARM Options*
  341.           -mapcs-frame -mno-apcs-frame
  342.           -mapcs-26 -mapcs-32
  343.           -mapcs-stack-check -mno-apcs-stack-check
  344.           -mapcs-float -mno-apcs-float
  345.           -mapcs-reentrant -mno-apcs-reentrant
  346.           -msched-prolog -mno-sched-prolog
  347.           -mlittle-endian -mbig-endian -mwords-little-endian
  348.           -mshort-load-bytes -mno-short-load-bytes -mshort-load-words -mno-short-load-words
  349.           -msoft-float -mhard-float -mfpe
  350.           -mthumb-interwork -mno-thumb-interwork
  351.           -mcpu= -march= -mfpe=
  352.           -mstructure-size-boundary=
  353.           -mbsd -mxopen -mno-symrename
  354.           -mabort-on-noreturn
  355.           -mno-sched-prolog
  356.           
  357.           *Thumb Options*
  358.           -mtpcs-frame -mno-tpcs-frame
  359.           -mtpcs-leaf-frame -mno-tpcs-leaf-frame
  360.           -mlittle-endian  -mbig-endian
  361.           -mthumb-interwork -mno-thumb-interwork
  362.           -mstructure-size-boundary=
  363.           
  364.           *MN10200 Options*
  365.           -mrelax
  366.           
  367.           *MN10300 Options*
  368.           -mmult-bug
  369.           -mno-mult-bug
  370.           -mrelax
  371.           
  372.           *M32R/D Options*
  373.           -mcode-model=MODEL TYPE  -msdata=SDATA TYPE
  374.           -G NUM
  375.           
  376.           *M88K Options*
  377.           -m88000  -m88100  -m88110  -mbig-pic
  378.           -mcheck-zero-division  -mhandle-large-shift
  379.           -midentify-revision  -mno-check-zero-division
  380.           -mno-ocs-debug-info  -mno-ocs-frame-position
  381.           -mno-optimize-arg-area  -mno-serialize-volatile
  382.           -mno-underscores  -mocs-debug-info
  383.           -mocs-frame-position  -moptimize-arg-area
  384.           -mserialize-volatile  -mshort-data-NUM  -msvr3
  385.           -msvr4  -mtrap-large-shift  -muse-div-instruction
  386.           -mversion-03.00  -mwarn-passed-structs
  387.           
  388.           *RS/6000 and PowerPC Options*
  389.           -mcpu=CPU TYPE
  390.           -mtune=CPU TYPE
  391.           -mpower  -mno-power  -mpower2  -mno-power2
  392.           -mpowerpc  -mno-powerpc
  393.           -mpowerpc-gpopt  -mno-powerpc-gpopt
  394.           -mpowerpc-gfxopt  -mno-powerpc-gfxopt
  395.           -mnew-mnemonics  -mno-new-mnemonics
  396.           -mfull-toc   -mminimal-toc  -mno-fop-in-toc  -mno-sum-in-toc
  397.           -maix64  -maix32  -mxl-call  -mno-xl-call  -mthreads  -mpe
  398.           -msoft-float  -mhard-float  -mmultiple  -mno-multiple
  399.           -mstring  -mno-string  -mupdate  -mno-update
  400.           -mfused-madd  -mno-fused-madd  -mbit-align  -mno-bit-align
  401.           -mstrict-align  -mno-strict-align  -mrelocatable
  402.           -mno-relocatable  -mrelocatable-lib  -mno-relocatable-lib
  403.           -mtoc  -mno-toc -mlittle  -mlittle-endian  -mbig  -mbig-endian
  404.           -mcall-aix  -mcall-sysv  -mprototype  -mno-prototype
  405.           -msim  -mmvme  -mads  -myellowknife  -memb -msdata
  406.           -msdata=OPT  -G NUM
  407.           
  408.           *RT Options*
  409.           -mcall-lib-mul  -mfp-arg-in-fpregs  -mfp-arg-in-gregs
  410.           -mfull-fp-blocks  -mhc-struct-return  -min-line-mul
  411.           -mminimum-fp-blocks  -mnohc-struct-return
  412.           
  413.           *MIPS Options*
  414.           -mabicalls  -mcpu=CPU TYPE  -membedded-data
  415.           -membedded-pic  -mfp32  -mfp64  -mgas  -mgp32  -mgp64
  416.           -mgpopt  -mhalf-pic  -mhard-float  -mint64  -mips1
  417.           -mips2  -mips3 -mips4 -mlong64  -mlong32 -mlong-calls  -mmemcpy
  418.           -mmips-as  -mmips-tfile  -mno-abicalls
  419.           -mno-embedded-data  -mno-embedded-pic
  420.           -mno-gpopt  -mno-long-calls
  421.           -mno-memcpy  -mno-mips-tfile  -mno-rnames  -mno-stats
  422.           -mrnames  -msoft-float
  423.           -m4650  -msingle-float  -mmad
  424.           -mstats  -EL  -EB  -G NUM  -nocpp
  425.           -mabi=32 -mabi=n32 -mabi=64 -mabi=eabi
  426.           
  427.           *i386 Options*
  428.           -mcpu=CPU TYPE
  429.           -march=CPU TYPE
  430.           -mieee-fp  -mno-fancy-math-387
  431.           -mno-fp-ret-in-387  -msoft-float  -msvr3-shlib
  432.           -mno-wide-multiply  -mrtd  -malign-double
  433.           -mreg-alloc=LIST  -mregparm=NUM
  434.           -malign-jumps=NUM  -malign-loops=NUM
  435.           -malign-functions=NUM -mpreferred-stack-boundary=NUM
  436.           
  437.           *HPPA Options*
  438.           -march=ARCHITECTURE TYPE
  439.           -mbig-switch  -mdisable-fpregs  -mdisable-indexing
  440.           -mfast-indirect-calls -mgas  -mjump-in-delay
  441.           -mlong-load-store  -mno-big-switch  -mno-disable-fpregs
  442.           -mno-disable-indexing  -mno-fast-indirect-calls  -mno-gas
  443.           -mno-jump-in-delay  -mno-long-load-store
  444.           -mno-portable-runtime  -mno-soft-float  -mno-space
  445.           -mno-space-regs  -msoft-float  -mpa-risc-1-0
  446.           -mpa-risc-1-1  -mpa-risc-2-0 -mportable-runtime
  447.           -mschedule=CPU TYPE  -mspace  -mspace-regs
  448.           
  449.           *Intel 960 Options*
  450.           -mCPU TYPE  -masm-compat  -mclean-linkage
  451.           -mcode-align  -mcomplex-addr  -mleaf-procedures
  452.           -mic-compat  -mic2.0-compat  -mic3.0-compat
  453.           -mintel-asm  -mno-clean-linkage  -mno-code-align
  454.           -mno-complex-addr  -mno-leaf-procedures
  455.           -mno-old-align  -mno-strict-align  -mno-tail-call
  456.           -mnumerics  -mold-align  -msoft-float  -mstrict-align
  457.           -mtail-call
  458.           
  459.           *DEC Alpha Options*
  460.           -mfp-regs  -mno-fp-regs -mno-soft-float  -msoft-float
  461.           -malpha-as -mgas
  462.           -mieee  -mieee-with-inexact  -mieee-conformant
  463.           -mfp-trap-mode=MODE  -mfp-rounding-mode=MODE
  464.           -mtrap-precision=MODE  -mbuild-constants
  465.           -mcpu=CPU TYPE
  466.           -mbwx -mno-bwx -mcix -mno-cix -mmax -mno-max
  467.           -mmemory-latency=TIME
  468.           
  469.           *Clipper Options*
  470.           -mc300  -mc400
  471.           
  472.           *H8/300 Options*
  473.           -mrelax  -mh -ms -mint32  -malign-300
  474.           
  475.           *SH Options*
  476.           -m1  -m2  -m3  -m3e  -mb  -ml  -mdalign -mrelax
  477.           
  478.           *System V Options*
  479.           -Qy  -Qn  -YP,PATHS  -Ym,DIR
  480.           
  481.           *ARC Options*
  482.           -EB  -EL
  483.           -mmangle-cpu  -mcpu=CPU  -mtext=TEXT SECTION
  484.           -mdata=DATA SECTION  -mrodata=READONLY DATA SECTION
  485.           
  486.           *TMS320C3x/C4x Options*
  487.           -mcpu=CPU -mbig -msmall -mregparm -mmemparm
  488.           -mfast-fix -mmpyi -mbk -mti -mdp-isr-reload
  489.           -mrpts=COUNT  -mrptb -mdb -mloop-unsigned
  490.           -mparallel-insns -mparallel-mpy -mpreserve-float
  491.           
  492.           *V850 Options*
  493.           -mlong-calls -mno-long-calls -mep -mno-ep
  494.           -mprolog-function -mno-prolog-function -mspace
  495.           -mtda=N -msda=N -mzda=N
  496.           -mv850 -mbig-switch
  497.           
  498.           *NS32K Options*
  499.           -m32032 -m32332 -m32532 -m32081 -m32381 -mmult-add -mnomult-add
  500.           -msoft-float -mrtd -mnortd -mregparam -mnoregparam -msb -mnosb
  501.           -mbitfield -mnobitfield -mhimem -mnohimem
  502.  
  503. *Code Generation Options*
  504.      *Note Options for Code Generation Conventions: Code Gen Options.
  505.           -fcall-saved-REG  -fcall-used-REG
  506.           -fexceptions -ffixed-REG  -finhibit-size-directive
  507.           -fcheck-memory-usage  -fprefix-function-name
  508.           -fno-common  -fno-ident  -fno-gnu-linker
  509.           -fpcc-struct-return  -fpic  -fPIC
  510.           -freg-struct-return  -fshared-data  -fshort-enums
  511.           -fshort-double  -fvolatile  -fvolatile-global -fvolatile-static
  512.           -fverbose-asm -fpack-struct  -fstack-check
  513.           -fargument-alias  -fargument-noalias
  514.           -fargument-noalias-global
  515.           -fleading-underscore
  516.  
  517. * Menu:
  518.  
  519. * Overall Options::     Controlling the kind of output:
  520.                         an executable, object files, assembler files,
  521.                         or preprocessed source.
  522. * C Dialect Options::   Controlling the variant of C language compiled.
  523. * C++ Dialect Options:: Variations on C++.
  524. * Warning Options::     How picky should the compiler be?
  525. * Debugging Options::   Symbol tables, measurements, and debugging dumps.
  526. * Optimize Options::    How much optimization?
  527. * Preprocessor Options:: Controlling header files and macro definitions.
  528.                          Also, getting dependency information for Make.
  529. * Assembler Options::   Passing options to the assembler.
  530. * Link Options::        Specifying libraries and so on.
  531. * Directory Options::   Where to find header files and libraries.
  532.                         Where to find the compiler executable files.
  533. * Target Options::      Running a cross-compiler, or an old version of GCC.
  534.  
  535. 
  536. File: gcc.info,  Node: Overall Options,  Next: Invoking G++,  Prev: Option Summary,  Up: Invoking GCC
  537.  
  538. Options Controlling the Kind of Output
  539. ======================================
  540.  
  541.    Compilation can involve up to four stages: preprocessing, compilation
  542. proper, assembly and linking, always in that order.  The first three
  543. stages apply to an individual source file, and end by producing an
  544. object file; linking combines all the object files (those newly
  545. compiled, and those specified as input) into an executable file.
  546.  
  547.    For any given input file, the file name suffix determines what kind
  548. of compilation is done:
  549.  
  550. `FILE.c'
  551.      C source code which must be preprocessed.
  552.  
  553. `FILE.i'
  554.      C source code which should not be preprocessed.
  555.  
  556. `FILE.ii'
  557.      C++ source code which should not be preprocessed.
  558.  
  559. `FILE.m'
  560.      Objective-C source code.  Note that you must link with the library
  561.      `libobjc.a' to make an Objective-C program work.
  562.  
  563. `FILE.h'
  564.      C header file (not to be compiled or linked).
  565.  
  566. `FILE.cc'
  567. `FILE.cxx'
  568. `FILE.cpp'
  569. `FILE.C'
  570.      C++ source code which must be preprocessed.  Note that in `.cxx',
  571.      the last two letters must both be literally `x'.  Likewise, `.C'
  572.      refers to a literal capital C.
  573.  
  574. `FILE.s'
  575.      Assembler code.
  576.  
  577. `FILE.S'
  578.      Assembler code which must be preprocessed.
  579.  
  580. `OTHER'
  581.      An object file to be fed straight into linking.  Any file name
  582.      with no recognized suffix is treated this way.
  583.  
  584.    You can specify the input language explicitly with the `-x' option:
  585.  
  586. `-x LANGUAGE'
  587.      Specify explicitly the LANGUAGE for the following input files
  588.      (rather than letting the compiler choose a default based on the
  589.      file name suffix).  This option applies to all following input
  590.      files until the next `-x' option.  Possible values for LANGUAGE
  591.      are:
  592.           c  objective-c  c++
  593.           c-header  cpp-output  c++-cpp-output
  594.           assembler  assembler-with-cpp
  595.  
  596. `-x none'
  597.      Turn off any specification of a language, so that subsequent files
  598.      are handled according to their file name suffixes (as they are if
  599.      `-x' has not been used at all).
  600.  
  601.    If you only want some of the stages of compilation, you can use `-x'
  602. (or filename suffixes) to tell `gcc' where to start, and one of the
  603. options `-c', `-S', or `-E' to say where `gcc' is to stop.  Note that
  604. some combinations (for example, `-x cpp-output -E' instruct `gcc' to do
  605. nothing at all.
  606.  
  607. `-c'
  608.      Compile or assemble the source files, but do not link.  The linking
  609.      stage simply is not done.  The ultimate output is in the form of an
  610.      object file for each source file.
  611.  
  612.      By default, the object file name for a source file is made by
  613.      replacing the suffix `.c', `.i', `.s', etc., with `.o'.
  614.  
  615.      Unrecognized input files, not requiring compilation or assembly,
  616.      are ignored.
  617.  
  618. `-S'
  619.      Stop after the stage of compilation proper; do not assemble.  The
  620.      output is in the form of an assembler code file for each
  621.      non-assembler input file specified.
  622.  
  623.      By default, the assembler file name for a source file is made by
  624.      replacing the suffix `.c', `.i', etc., with `.s'.
  625.  
  626.      Input files that don't require compilation are ignored.
  627.  
  628. `-E'
  629.      Stop after the preprocessing stage; do not run the compiler
  630.      proper.  The output is in the form of preprocessed source code,
  631.      which is sent to the standard output.
  632.  
  633.      Input files which don't require preprocessing are ignored.
  634.  
  635. `-o FILE'
  636.      Place output in file FILE.  This applies regardless to whatever
  637.      sort of output is being produced, whether it be an executable file,
  638.      an object file, an assembler file or preprocessed C code.
  639.  
  640.      Since only one output file can be specified, it does not make
  641.      sense to use `-o' when compiling more than one input file, unless
  642.      you are producing an executable file as output.
  643.  
  644.      If `-o' is not specified, the default is to put an executable file
  645.      in `a.out', the object file for `SOURCE.SUFFIX' in `SOURCE.o', its
  646.      assembler file in `SOURCE.s', and all preprocessed C source on
  647.      standard output.
  648.  
  649. `-v'
  650.      Print (on standard error output) the commands executed to run the
  651.      stages of compilation.  Also print the version number of the
  652.      compiler driver program and of the preprocessor and the compiler
  653.      proper.
  654.  
  655. `-pipe'
  656.      Use pipes rather than temporary files for communication between the
  657.      various stages of compilation.  This fails to work on some systems
  658.      where the assembler is unable to read from a pipe; but the GNU
  659.      assembler has no trouble.
  660.  
  661. `--help'
  662.      Print (on the standard output) a description of the command line
  663.      options understood by `gcc'.  If the `-v' option is also specified
  664.      then `--help' will also be passed on to the various processes
  665.      invoked by `gcc', so that they can display the command line options
  666.      they accept.  If the `-W' option is also specified then command
  667.      line options which have no documentation associated with them will
  668.      also be displayed.
  669.  
  670. 
  671. File: gcc.info,  Node: Invoking G++,  Next: C Dialect Options,  Prev: Overall Options,  Up: Invoking GCC
  672.  
  673. Compiling C++ Programs
  674. ======================
  675.  
  676.    C++ source files conventionally use one of the suffixes `.C', `.cc',
  677. `.cpp', `.c++', `.cp', or `.cxx'; preprocessed C++ files use the suffix
  678. `.ii'.  GCC recognizes files with these names and compiles them as C++
  679. programs even if you call the compiler the same way as for compiling C
  680. programs (usually with the name `gcc').
  681.  
  682.    However, C++ programs often require class libraries as well as a
  683. compiler that understands the C++ language--and under some
  684. circumstances, you might want to compile programs from standard input,
  685. or otherwise without a suffix that flags them as C++ programs.  `g++'
  686. is a program that calls GCC with the default language set to C++, and
  687. automatically specifies linking against the C++ library.  On many
  688. systems, the script `g++' is also installed with the name `c++'.
  689.  
  690.    When you compile C++ programs, you may specify many of the same
  691. command-line options that you use for compiling programs in any
  692. language; or command-line options meaningful for C and related
  693. languages; or options that are meaningful only for C++ programs.  *Note
  694. Options Controlling C Dialect: C Dialect Options, for explanations of
  695. options for languages related to C.  *Note Options Controlling C++
  696. Dialect: C++ Dialect Options, for explanations of options that are
  697. meaningful only for C++ programs.
  698.  
  699. 
  700. File: gcc.info,  Node: C Dialect Options,  Next: C++ Dialect Options,  Prev: Invoking G++,  Up: Invoking GCC
  701.  
  702. Options Controlling C Dialect
  703. =============================
  704.  
  705.    The following options control the dialect of C (or languages derived
  706. from C, such as C++ and Objective C) that the compiler accepts:
  707.  
  708. `-ansi'
  709.      In C mode, support all ANSI standard C programs.  In C++ mode,
  710.      remove GNU extensions that conflict with ANSI C++.
  711.  
  712.      This turns off certain features of GCC that are incompatible with
  713.      ANSI C (when compiling C code), or of ANSI standard C++ (when
  714.      compiling C++ code), such as the `asm' and `typeof' keywords, and
  715.      predefined macros such as `unix' and `vax' that identify the type
  716.      of system you are using.  It also enables the undesirable and
  717.      rarely used ANSI trigraph feature.  For the C compiler, it
  718.      disables recognition of C++ style `//' comments as well as the
  719.      `inline' keyword.  For the C++ compiler, `-foperator-names' is
  720.      enabled as well.
  721.  
  722.      The alternate keywords `__asm__', `__extension__', `__inline__'
  723.      and `__typeof__' continue to work despite `-ansi'.  You would not
  724.      want to use them in an ANSI C program, of course, but it is useful
  725.      to put them in header files that might be included in compilations
  726.      done with `-ansi'.  Alternate predefined macros such as `__unix__'
  727.      and `__vax__' are also available, with or without `-ansi'.
  728.  
  729.      The `-ansi' option does not cause non-ANSI programs to be rejected
  730.      gratuitously.  For that, `-pedantic' is required in addition to
  731.      `-ansi'.  *Note Warning Options::.
  732.  
  733.      The macro `__STRICT_ANSI__' is predefined when the `-ansi' option
  734.      is used.  Some header files may notice this macro and refrain from
  735.      declaring certain functions or defining certain macros that the
  736.      ANSI standard doesn't call for; this is to avoid interfering with
  737.      any programs that might use these names for other things.
  738.  
  739.      The functions `alloca', `abort', `exit', and `_exit' are not
  740.      builtin functions when `-ansi' is used.
  741.  
  742. `-fstd='
  743.      Determine the language standard.  A value for this option must be
  744.      provided; possible values are
  745.  
  746.         - iso9899:1990 Same as -ansi
  747.  
  748.         - iso9899:199409 ISO C as modified in amend. 1
  749.  
  750.         - iso9899:199x ISO C 9x
  751.  
  752.         - c89 same as -std=iso9899:1990
  753.  
  754.         - c9x same as -std=iso9899:199x
  755.  
  756.         - gnu89 default, iso9899:1990 + gnu extensions
  757.  
  758.         - gnu9x iso9899:199x + gnu extensions
  759.  
  760.      Even when this option is not specified, you can still use some of
  761.      the features of newer standards in so far as they do not conflict
  762.      with previous C standards.  For example, you may use
  763.      `__restrict__' even when -fstd=c9x is not specified.
  764.  
  765. `-fno-asm'
  766.      Do not recognize `asm', `inline' or `typeof' as a keyword, so that
  767.      code can use these words as identifiers.  You can use the keywords
  768.      `__asm__', `__inline__' and `__typeof__' instead.  `-ansi' implies
  769.      `-fno-asm'.
  770.  
  771.      In C++, this switch only affects the `typeof' keyword, since `asm'
  772.      and `inline' are standard keywords.  You may want to use the
  773.      `-fno-gnu-keywords' flag instead, as it also disables the other,
  774.      C++-specific, extension keywords such as `headof'.
  775.  
  776. `-fno-builtin'
  777.      Don't recognize builtin functions that do not begin with
  778.      `__builtin_' as prefix.  Currently, the functions affected include
  779.      `abort', `abs', `alloca', `cos', `exit', `fabs', `ffs', `labs',
  780.      `memcmp', `memcpy', `sin', `sqrt', `strcmp', `strcpy', and
  781.      `strlen'.
  782.  
  783.      GCC normally generates special code to handle certain builtin
  784.      functions more efficiently; for instance, calls to `alloca' may
  785.      become single instructions that adjust the stack directly, and
  786.      calls to `memcpy' may become inline copy loops.  The resulting
  787.      code is often both smaller and faster, but since the function
  788.      calls no longer appear as such, you cannot set a breakpoint on
  789.      those calls, nor can you change the behavior of the functions by
  790.      linking with a different library.
  791.  
  792.      The `-ansi' option prevents `alloca' and `ffs' from being builtin
  793.      functions, since these functions do not have an ANSI standard
  794.      meaning.
  795.  
  796. `-fhosted'
  797.      Assert that compilation takes place in a hosted environment.  This
  798.      implies `-fbuiltin'.  A hosted environment is one in which the
  799.      entire standard library is available, and in which `main' has a
  800.      return type of `int'.  Examples are nearly everything except a
  801.      kernel.  This is equivalent to `-fno-freestanding'.
  802.  
  803. `-ffreestanding'
  804.      Assert that compilation takes place in a freestanding environment.
  805.      This implies `-fno-builtin'.  A freestanding environment is one
  806.      in which the standard library may not exist, and program startup
  807.      may not necessarily be at `main'.  The most obvious example is an
  808.      OS kernel.  This is equivalent to `-fno-hosted'.
  809.  
  810. `-trigraphs'
  811.      Support ANSI C trigraphs.  You don't want to know about this
  812.      brain-damage.  The `-ansi' option implies `-trigraphs'.
  813.  
  814. `-traditional'
  815.      Attempt to support some aspects of traditional C compilers.
  816.      Specifically:
  817.  
  818.         * All `extern' declarations take effect globally even if they
  819.           are written inside of a function definition.  This includes
  820.           implicit declarations of functions.
  821.  
  822.         * The newer keywords `typeof', `inline', `signed', `const' and
  823.           `volatile' are not recognized.  (You can still use the
  824.           alternative keywords such as `__typeof__', `__inline__', and
  825.           so on.)
  826.  
  827.         * Comparisons between pointers and integers are always allowed.
  828.  
  829.         * Integer types `unsigned short' and `unsigned char' promote to
  830.           `unsigned int'.
  831.  
  832.         * Out-of-range floating point literals are not an error.
  833.  
  834.         * Certain constructs which ANSI regards as a single invalid
  835.           preprocessing number, such as `0xe-0xd', are treated as
  836.           expressions instead.
  837.  
  838.         * String "constants" are not necessarily constant; they are
  839.           stored in writable space, and identical looking constants are
  840.           allocated separately.  (This is the same as the effect of
  841.           `-fwritable-strings'.)
  842.  
  843.         * All automatic variables not declared `register' are preserved
  844.           by `longjmp'.  Ordinarily, GNU C follows ANSI C: automatic
  845.           variables not declared `volatile' may be clobbered.
  846.  
  847.         * The character escape sequences `\x' and `\a' evaluate as the
  848.           literal characters `x' and `a' respectively.  Without
  849.           `-traditional', `\x' is a prefix for the hexadecimal
  850.           representation of a character, and `\a' produces a bell.
  851.  
  852.      You may wish to use `-fno-builtin' as well as `-traditional' if
  853.      your program uses names that are normally GNU C builtin functions
  854.      for other purposes of its own.
  855.  
  856.      You cannot use `-traditional' if you include any header files that
  857.      rely on ANSI C features.  Some vendors are starting to ship
  858.      systems with ANSI C header files and you cannot use `-traditional'
  859.      on such systems to compile files that include any system headers.
  860.  
  861.      The `-traditional' option also enables `-traditional-cpp', which
  862.      is described next.
  863.  
  864. `-traditional-cpp'
  865.      Attempt to support some aspects of traditional C preprocessors.
  866.      Specifically:
  867.  
  868.         * Comments convert to nothing at all, rather than to a space.
  869.           This allows traditional token concatenation.
  870.  
  871.         * In a preprocessing directive, the `#' symbol must appear as
  872.           the first character of a line.
  873.  
  874.         * Macro arguments are recognized within string constants in a
  875.           macro definition (and their values are stringified, though
  876.           without additional quote marks, when they appear in such a
  877.           context).  The preprocessor always considers a string
  878.           constant to end at a newline.
  879.  
  880.         * The predefined macro `__STDC__' is not defined when you use
  881.           `-traditional', but `__GNUC__' is (since the GNU extensions
  882.           which `__GNUC__' indicates are not affected by
  883.           `-traditional').  If you need to write header files that work
  884.           differently depending on whether `-traditional' is in use, by
  885.           testing both of these predefined macros you can distinguish
  886.           four situations: GNU C, traditional GNU C, other ANSI C
  887.           compilers, and other old C compilers.  The predefined macro
  888.           `__STDC_VERSION__' is also not defined when you use
  889.           `-traditional'.  *Note Standard Predefined Macros:
  890.           (cpp.info)Standard Predefined, for more discussion of these
  891.           and other predefined macros.
  892.  
  893.         * The preprocessor considers a string constant to end at a
  894.           newline (unless the newline is escaped with `\').  (Without
  895.           `-traditional', string constants can contain the newline
  896.           character as typed.)
  897.  
  898. `-fcond-mismatch'
  899.      Allow conditional expressions with mismatched types in the second
  900.      and third arguments.  The value of such an expression is void.
  901.  
  902. `-funsigned-char'
  903.      Let the type `char' be unsigned, like `unsigned char'.
  904.  
  905.      Each kind of machine has a default for what `char' should be.  It
  906.      is either like `unsigned char' by default or like `signed char' by
  907.      default.
  908.  
  909.      Ideally, a portable program should always use `signed char' or
  910.      `unsigned char' when it depends on the signedness of an object.
  911.      But many programs have been written to use plain `char' and expect
  912.      it to be signed, or expect it to be unsigned, depending on the
  913.      machines they were written for.  This option, and its inverse, let
  914.      you make such a program work with the opposite default.
  915.  
  916.      The type `char' is always a distinct type from each of `signed
  917.      char' or `unsigned char', even though its behavior is always just
  918.      like one of those two.
  919.  
  920. `-fsigned-char'
  921.      Let the type `char' be signed, like `signed char'.
  922.  
  923.      Note that this is equivalent to `-fno-unsigned-char', which is the
  924.      negative form of `-funsigned-char'.  Likewise, the option
  925.      `-fno-signed-char' is equivalent to `-funsigned-char'.
  926.  
  927.      You may wish to use `-fno-builtin' as well as `-traditional' if
  928.      your program uses names that are normally GNU C builtin functions
  929.      for other purposes of its own.
  930.  
  931.      You cannot use `-traditional' if you include any header files that
  932.      rely on ANSI C features.  Some vendors are starting to ship
  933.      systems with ANSI C header files and you cannot use `-traditional'
  934.      on such systems to compile files that include any system headers.
  935.  
  936. `-fsigned-bitfields'
  937. `-funsigned-bitfields'
  938. `-fno-signed-bitfields'
  939. `-fno-unsigned-bitfields'
  940.      These options control whether a bitfield is signed or unsigned,
  941.      when the declaration does not use either `signed' or `unsigned'.
  942.      By default, such a bitfield is signed, because this is consistent:
  943.      the basic integer types such as `int' are signed types.
  944.  
  945.      However, when `-traditional' is used, bitfields are all unsigned
  946.      no matter what.
  947.  
  948. `-fwritable-strings'
  949.      Store string constants in the writable data segment and don't
  950.      uniquize them.  This is for compatibility with old programs which
  951.      assume they can write into string constants.  The option
  952.      `-traditional' also has this effect.
  953.  
  954.      Writing into string constants is a very bad idea; "constants"
  955.      should be constant.
  956.  
  957. `-fallow-single-precision'
  958.      Do not promote single precision math operations to double
  959.      precision, even when compiling with `-traditional'.
  960.  
  961.      Traditional K&R C promotes all floating point operations to double
  962.      precision, regardless of the sizes of the operands.   On the
  963.      architecture for which you are compiling, single precision may be
  964.      faster than double precision.   If you must use `-traditional',
  965.      but want to use single precision operations when the operands are
  966.      single precision, use this option.   This option has no effect
  967.      when compiling with ANSI or GNU C conventions (the default).
  968.  
  969.